package com.inspur.gs.sbssdl.database.spqm.spqm.front.sbssryzs.voactions;

import com.inspur.edp.bff.api.manager.context.DataMapperContext;
import com.inspur.edp.bff.spi.action.datamapping.DataMappingAction;
import com.inspur.edp.cef.entity.entity.IEntityData;

import java.util.ArrayList;

public class dataMappingVOAction extends DataMappingAction {

    public dataMappingVOAction(DataMapperContext context) {
        super(context);
    }

    @Override
    public void execute() {
        ArrayList<IEntityData> entityData = new ArrayList<>();
        if (getMapContext().getSourceData().containsKey("queryresult")) {
            entityData = (ArrayList<IEntityData>) getMapContext().getSourceData().get("queryresult");
        }
        getMapContext().setTargetResult(entityData);
    }
}
